# documents.py

from django_elasticsearch_dsl import Document
from django_elasticsearch_dsl.registries import registry
from .models import MyData


@registry.register_document
class MydataDocument(Document):
    class Index:
        name = 'data_taoke'
        settings = {'number_of_shards': 1,
                    'number_of_replicas': 0}

    class Django:
        model = MyData
        fields = [
            'goods_name',
            'shop_name',
        ]
